home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / June 96 / Re Re(2) Auto Destruct Object < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.6 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Re(2): Auto Destruct Objects
  2. Sent:        6/27/96 11:54 AM
  3. Received:    6/27/96 12:01 PM
  4. From:        Henri Lamiraux, lamiraux@apple.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >I guess I wasn't specific enough with my request. It is my impression that
  9. >native C++ exceptions will auto distruct any stack based objects. The ODF
  10. >documentation (pg. 307) indicates that heap based objects are also auto
  11. >distructable. If this is true then do the heap based objects have the same
  12. >scope as stack based objects with respect to exception handling (i.e. are 
  13. >they
  14. >deleted when you exit the method)? Also is there any documentation on how to
  15. >turn off the ODF emulated exceptions and use Metrowerk's?
  16.  
  17.  
  18. What the documentation is saying is that you can 'new' an auto-destruct 
  19. object (by using the FW_NEW macro) but it will not be destroyed if an 
  20. exception occurs (like with standard C++ exceptions). Only stack based 
  21. auto-destroy objects are deleted (again like with standard C++ 
  22. exceptions). ODF emulation follows excatly the standard C++ model.
  23.  
  24. There is a document called 'ODF vs Native exceptions and RTTI' showing 
  25. you how to turn off ODF emulation and use native exceptions and RTTI. 
  26. This document is on the OpenDoc DR5 CD and the ODF web page.
  27.  
  28. ........................................................................
  29.  Henri Lamiraux                                      lamiraux@apple.com
  30.  Apple Computer, Inc.                 OpenDoc(tm) Development Framework
  31. ........................................................................
  32.  
  33.